package com.otsdemo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.otsdemo.entity.Course;
import com.otsdemo.entity.Homework;
import com.otsdemo.mapper.StudentMapper;
import com.otsdemo.entity.Student;
import com.otsdemo.service.OrderService;
import com.otsdemo.service.StudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Autowired
    private OrderService orderService;

    @Override
    public List<Course> getCourseList() {

        return studentMapper.getAllCourses();
    }

    @Override
    public boolean selectCourse(Integer studentId, Integer courseId) {
        return studentMapper.selectCourse(courseId);
    }

    @Override
    public boolean submitHomework(Homework homework) {
        return studentMapper.submitHomework(homework);
    }


}

